#ifndef NUMBER_H
#define NUMBER_H

#include "valuetype.h"

namespace core
{

class Number : public ValueType
{
public:
    Number(int value = 0);
    ~Number();

    void setValue(const QVariant& value);
    QVariant getValue() const;

    bool operator ==(const Type& type) const;
    bool operator !=(const Type& type) const;

    Type* copy() const;

    Number operator+(const Number& number) const;
    Number operator-(const Number& number) const;

    Number& operator++();
    Number operator++(int);

    Number& operator--();
    Number operator--(int);

    bool canConvert(const TypeValue& value) const;
    ValueKeywordMask keywordMask() const;

public:
    static const TypeName NAME;

private:
    int m_value;
};

} // namespace core

#endif
